﻿using RpcHelper.Config;

namespace HttpService.Config
{
    public class UpConfig
    {
        internal void Init()
        {
            LocalConfig.Local.RefreshEvent += this.Local_RefreshEvent;
        }

        private void Local_RefreshEvent(IConfigCollect config, string name)
        {
            if (name.StartsWith("http:up:") || name == "http:up")
            {
                this.MemoryUpSize = config.GetValue<long>("http:up:MemoryUpSize", 10485760);
            }
        }
        /// <summary>
        /// 限制使用内存做存储介质的文件大小
        /// </summary>
        public long MemoryUpSize
        {
            set;
            get;
        }
    }
}
